#include "Player.h"
#include <iostream>
#include <clocale>
#include "Game.h"
#include <vector>
#include <thread>

#define MAX 10

using namespace std;

int main()
{
	deque<char> playerOneQueue, playerTwoQueue;
	deque<Pos> gameQueue;
	setlocale(LC_ALL, "swedish");

	Player PlayerOne('1', 'a', 'd', 'w', 's', 0, 0, MAX, playerOneQueue, gameQueue), PlayerTwo('2', 'j','l','i','k', MAX - 1, MAX - 1, MAX, playerTwoQueue, gameQueue);
	Game game(MAX, gameQueue, playerOneQueue, playerTwoQueue, PlayerOne, PlayerTwo);
	thread playerOneThread(PlayerOne), playerTwoThread(PlayerTwo), gameThread(game);
	playerOneThread.join();
	playerTwoThread.join();
	gameThread.join();


	system("PAUSE");
	return 0;
}